The Fireworks Integration API > The Fireworks integration API > FWLaunch.optimizeInFireworks() |
![]() ![]() ![]() |
FWLaunch.optimizeInFireworks()
Availability
Dreamweaver 2.0, Fireworks 2.0
Description
Launches a Fireworks optimization session for the specified image.
Arguments
docURL
, imageURL
, {targetWidth}
, {targetHeight}
![]() |
The first argument is the path to the active document, expressed as a file:// URL. |
![]() |
The second argument is the path to the selected image. If the path is relative, it is relative to docURL . |
![]() |
The third argument, if supplied, is the width to which the image should be resized. |
![]() |
The fourth argument, if supplied, is the height to which the image should be resized. |
Returns
0 if a Fireworks optimization session is successfully launched for the specified image; otherwise, a nonzero error code indicating that one of the following errors occurred:
![]() |
1: Invalid usage; docURL , imageURL , or both were specified as null or empty string. |
![]() |
2: File I/O error; Fireworks is unable to create a response file because the disk is full. |
![]() |
3: Error notifying Dreamweaver; the user is not running a valid version of Dreamweaver (2.0 or later). |
![]() |
4: Error launching Fireworks process; the function did not launch a valid version of Fireworks (2.0 or later). |
![]() |
5: User cancelled the operation. |
![]() ![]() ![]() |